﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Tea.Parser {

    /// <summary>
    /// 表示一个语法数遍历工具。
    /// </summary>
    public interface IAstVisitor {

        void VisitArrayLiteral(ArrayLiteral arrayLiteral);

        void VisitAssignmentExpression(AssignmentExpression assignmentExpression);

        void VisitBlock(Block blockStatement);

        void VisitBreakStatement(BreakStatement breakStatement);

        void VisitCallNative(CallNative callNative);

        void VisitCaseClause(CaseClause caseLabel);

        void VisitConditionalExpression(ConditionalExpression conditionalExpression);

        void VisitContinueStatement(ContinueStatement continueStatement);

        void VisitPostfixExpression(PostfixExpression countOperation);

        void VisitConstStatement(ConstStatement constStatement);

        void VisitDebuggerStatement(DebuggerStatement debuggerStatement);

        void VisitDoWhileStatement(DoWhileStatement doWhileStatement);

        void VisitEmptyStatement(EmptyStatement emptyStatement);

        void VisitExpressionStatement(ExpressionStatement expressionStatement);

        void VisitFalseLiteral(FalseLiteral falseLiteral);

        void VisitForInStatement(ForInStatement forinStatement);

        void VisitForStatement(ForStatement forStatement);

        void VisitFunctionExpression(FunctionExpression functionExpression);

        void VisitFunctionCallExpression(FunctionCallExpression functionCallExpression);

        void VisitFunctionDeclaration(FunctionDeclaration functionDeclaration);

        void VisitLabelledStatement(LabelledStatement labelledStatement);

        void VisitNewExpression(NewExpression newExpression);

        void VisitNumberLiteral(NumberLiteral numberLiteral);

        void VisitNullLiteral(NullLiteral nullLiteral);

        /// <summary>
        /// 访问一个标识符。
        /// </summary>
        /// <param name="identifier">标识符。</param>
        void VisitIdentifier(Identifier identifier);

        void VisitIndexCallExpression(IndexCallExpression indexCallExpression);
        void VisitIfStatement(IfStatement ifStatement);

        void VisitIncrementOperation(IncrementOperation incrementOperation);

        void VisitObjectLiteral(ObjectLiteral objectLiteral);

        void VisitParamedExpression(ParamedExpression paramedExpression);

        void VisitProperty(ObjectLiteral.Property property);

        void VisitPropertyCallExpression(PropertyCallExpression propertyCallExpression);

        void VisitRegExpLiteral(RegExpLiteral regExpLiteral);

        void VisitReturnStatement(ReturnStatement returnStatement);

        void VisitSemicolon(Semicolon semicolon);

        void VisitStringLiteral(StringLiteral stringLiteral);

        void VisitSwitchStatement(SwitchStatement switchStatement);

        void VisitThisLiteral(ThisLiteral thisLiteral);

        void VisitThrowStatement(ThrowStatement throwStatement);

        void VisitTrueLiteral(TrueLiteral trueLiteral);

        void VisitTryCatchFinallyStatement(TryCatchFinallyStatement tryCatchFinallyStatement);

        void VisitTryCatchStatement(TryCatchStatement tryCatchStatement);

        void VisitTryFinallyStatement(TryFinallyStatement tryFinallyStatement);


        void VisitUndefinedExpression(UndefinedExpression undefinedExpression);

        void VisitUnaryExpression(UnaryExpression unaryExpression);

        void VisitVariableDeclaration(VariableDeclaration variableDeclaration);

        void VisitVariableStatement(VariableStatement variableStatement);

        void VisitWhileStatement(WhileStatement whileStatement);

        void VisitWithStatement(WithStatement withStatement);

        #if false 

        void VisitAddHandlerStatement(AddHandlerStatement addHandlerStatement);

        void VisitAddressOfExpression(AddressOfExpression addressOfExpression);

        void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression);

        void VisitAttribute(ICSharpCode.NRefactory.Ast.Attribute attribute);

        void VisitAttributeSection(AttributeSection attributeSection);

        void VisitBaseReferenceExpression(BaseReferenceExpression baseReferenceExpression);

        void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression);

        void VisitCastExpression(CastExpression castExpression);

        void VisitCatchClause(CatchClause catchClause);

        void VisitCheckedExpression(CheckedExpression checkedExpression);

        void VisitCheckedStatement(CheckedStatement checkedStatement);

        void VisitClassReferenceExpression(ClassReferenceExpression classReferenceExpression);

        void VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression);

        void VisitCompilationUnit(CompilationUnit compilationUnit);

        void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration);

        void VisitConstructorInitializer(ConstructorInitializer constructorInitializer);

        void VisitDefaultValueExpression(DefaultValueExpression defaultValueExpression);

        void VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration);

        void VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration);

        void VisitDirectionExpression(DirectionExpression directionExpression);

        void VisitDoLoopStatement(DoLoopStatement doLoopStatement);

        void VisitElseIfSection(ElseIfSection elseIfSection);

        void VisitEndStatement(EndStatement endStatement);

        void VisitEraseStatement(EraseStatement eraseStatement);

        void VisitErrorStatement(ErrorStatement errorStatement);

        void VisitEventAddRegion(EventAddRegion eventAddRegion);

        void VisitEventDeclaration(EventDeclaration eventDeclaration);

        void VisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion);

        void VisitEventRemoveRegion(EventRemoveRegion eventRemoveRegion);

        void VisitExitStatement(ExitStatement exitStatement);

        void VisitExpressionRangeVariable(ExpressionRangeVariable expressionRangeVariable);

        void VisitExternAliasDirective(ExternAliasDirective externAliasDirective);

        void VisitFieldDeclaration(FieldDeclaration fieldDeclaration);

        void VisitFixedStatement(FixedStatement fixedStatement);

        void VisitForNextStatement(ForNextStatement forNextStatement);

        void VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement);

        void VisitGotoStatement(GotoStatement gotoStatement);

        void VisitIdentifierExpression(IdentifierExpression identifierExpression);

        void VisitIfElseStatement(IfElseStatement ifElseStatement);

        void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration);

        void VisitIndexerExpression(IndexerExpression indexerExpression);

        void VisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference);

        void VisitInterfaceImplementation(InterfaceImplementation interfaceImplementation);

        void VisitInvocationExpression(InvocationExpression invocationExpression);

        void VisitLabelStatement(LabelStatement labelStatement);

        void VisitLambdaExpression(LambdaExpression lambdaExpression);

        void VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration);

        void VisitLockStatement(LockStatement lockStatement);

        void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression);

        void VisitMethodDeclaration(MethodDeclaration methodDeclaration);

        void VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression);

        void VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration);

        void VisitObjectCreateExpression(ObjectCreateExpression voidCreateExpression);

        void VisitOnErrorStatement(OnErrorStatement onErrorStatement);

        void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration);

        void VisitOptionDeclaration(OptionDeclaration optionDeclaration);

        void VisitParameterDeclarationExpression(ParameterDeclarationExpression parameterDeclarationExpression);

        void VisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression);

        void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression);

        void VisitPrimitiveExpression(PrimitiveExpression primitiveExpression);

        void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration);

        void VisitPropertyGetRegion(PropertyGetRegion propertyGetRegion);

        void VisitPropertySetRegion(PropertySetRegion propertySetRegion);

        void VisitQueryExpression(QueryExpression queryExpression);

        void VisitQueryExpressionAggregateClause(QueryExpressionAggregateClause queryExpressionAggregateClause);

        void VisitQueryExpressionDistinctClause(QueryExpressionDistinctClause queryExpressionDistinctClause);

        void VisitQueryExpressionFromClause(QueryExpressionFromClause queryExpressionFromClause);

        void VisitQueryExpressionGroupClause(QueryExpressionGroupClause queryExpressionGroupClause);

        void VisitQueryExpressionGroupJoinVBClause(QueryExpressionGroupJoinVBClause queryExpressionGroupJoinVBClause);

        void VisitQueryExpressionGroupVBClause(QueryExpressionGroupVBClause queryExpressionGroupVBClause);

        void VisitQueryExpressionJoinClause(QueryExpressionJoinClause queryExpressionJoinClause);

        void VisitQueryExpressionJoinConditionVB(QueryExpressionJoinConditionVB queryExpressionJoinConditionVB);

        void VisitQueryExpressionJoinVBClause(QueryExpressionJoinVBClause queryExpressionJoinVBClause);

        void VisitQueryExpressionLetClause(QueryExpressionLetClause queryExpressionLetClause);

        void VisitQueryExpressionLetVBClause(QueryExpressionLetVBClause queryExpressionLetVBClause);

        void VisitQueryExpressionOrderClause(QueryExpressionOrderClause queryExpressionOrderClause);

        void VisitQueryExpressionOrdering(QueryExpressionOrdering queryExpressionOrdering);

        void VisitQueryExpressionPartitionVBClause(QueryExpressionPartitionVBClause queryExpressionPartitionVBClause);

        void VisitQueryExpressionSelectClause(QueryExpressionSelectClause queryExpressionSelectClause);

        void VisitQueryExpressionSelectVBClause(QueryExpressionSelectVBClause queryExpressionSelectVBClause);

        void VisitQueryExpressionWhereClause(QueryExpressionWhereClause queryExpressionWhereClause);

        void VisitRaiseEventStatement(RaiseEventStatement raiseEventStatement);

        void VisitReDimStatement(ReDimStatement reDimStatement);

        void VisitRemoveHandlerStatement(RemoveHandlerStatement removeHandlerStatement);

        void VisitResumeStatement(ResumeStatement resumeStatement);

        void VisitSizeOfExpression(SizeOfExpression sizeOfExpression);

        void VisitStackAllocExpression(StackAllocExpression stackAllocExpression);

        void VisitStopStatement(StopStatement stopStatement);

        void VisitSwitchSection(SwitchSection switchSection);

        void VisitTemplateDefinition(TemplateDefinition templateDefinition);

        void VisitTypeDeclaration(TypeDeclaration typeDeclaration);

        void VisitTypeOfExpression(TypeOfExpression typeOfExpression);

        void VisitTypeOfIsExpression(TypeOfIsExpression typeOfIsExpression);

        void VisitTypeReference(TypeReference typeReference);

        void VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression);

        void VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression);

        void VisitUncheckedExpression(UncheckedExpression uncheckedExpression);

        void VisitUncheckedStatement(UncheckedStatement uncheckedStatement);

        void VisitUnsafeStatement(UnsafeStatement unsafeStatement);

        void VisitUsing(Using @using);

        void VisitUsingDeclaration(UsingDeclaration usingDeclaration);

        void VisitUsingStatement(UsingStatement usingStatement);

        void VisitYieldStatement(YieldStatement yieldStatement);




#endif




        void VisitAdditiveExpression(AdditiveExpression additiveExpression);

        void VisitMultiplicativeExpression(MultiplicativeExpression multiplicativeExpression);

        void VisitShiftExpression(ShiftExpression shiftExpression);

        void VisitRelationalExpression(RelationalExpression relationalExpression);

        void VisitEqualityExpression(EqualityExpression equalityExpression);

        void VisitBitwiseExpression(BitwiseExpression bitwiseExpression);

        void VisitLogicalExpression(LogicalExpression logicalExpression);

        void VisitCommaExpression(CommaExpression commaExpression);

        void VisitUserDefinedOperatorExpression(UserDefinedOperatorExpression userDefinedOperatorExpression);

        void VisitModule(Module module);
    }
}
